package com.qingfeng.client.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qingfeng.base.model.Page;
import com.qingfeng.client.DO.GoodsInfoDo;
import com.qingfeng.client.VO.GoodsQueryVo;
import com.qingfeng.client.bean.Goods;
import com.qingfeng.client.bean.Goods2attrs;
import com.qingfeng.client.bean.GoodsCommon;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author zhangyuefei
 * @version 1.0
 * @date 2020/1/6 10:16 上午
 */
public interface GoodsMapper extends BaseMapper<Goods> {


    IPage<GoodsInfoDo> queryByStore(Page page, @Param("vo") GoodsQueryVo goodsQueryVo);

    List<GoodsCommon> queryAllByStore(@Param("vo") GoodsQueryVo goodsQueryVo);

    boolean delectByGoodsId(@Param("id") Long id, @Param("storeId") Long storeId);

    boolean updateDetail(@Param("goodsCommonId") Long goodsCommonId,@Param("detail") String detail);

    List<Map<String,Object>> getGoods(@Param("goodsCommonId") Long goodsCommonId);

    boolean changeState(@Param("ids") List<Long> ids, @Param("stat") int stat);

    List fanXian(Long id);


    List<Goods2attrs> getAttrsByGoodsCommonId(Long id);


}
